import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  { path:'/login', name: 'login', component: () => import('../view/login.vue')},
  { path:'/home', name: 'home', component: () => import('../view/home.vue')},
  { path: '', redirect: '/login' },
  { path: '*', redirect: '/login' }
]

const router = new VueRouter({
  mode: 'history',
  base: '/',
  routes
})

export default router
 